import React, { useState, createContext, useContext } from "react";
import "./index.css";
import { Card, Breadcrumb, Layout, Row, Col } from "antd";

//测试
// import NavigationBarTest from './head/NacigationBar.js';
// import { Cardtemplet } from './card/test.js';

import NavigationBar from "./head/index.js";
import { Cardtemplet } from "./card/index.js";
import Createcompent from "./card/Createcard.js";
import Addcompents from "./drawer/AddCompent.js";

/**
 *
 * 接口返回格式
 *  { data: Object, code: number, msg: string },
 *  code: 接口返回状态
 *  data: 返回数据
 *  msg:  返回信息
 */
import {
  getComponentList,
  deleteComponent,
  getComponentType,
  addComponent,
  editComponent,
} from "../.././api/component/index";

const { Content } = Layout;
const UpdateContext = createContext();

function Home() {
  return (
    <>
      <Card>
        <Breadcrumb separator=">">
          <Breadcrumb.Item href="/home">角色管理</Breadcrumb.Item>
          <Breadcrumb.Item href="/home/1">组件管理</Breadcrumb.Item>
        </Breadcrumb>
        <Content style={{ margin: "10px 0" }}>
          <NavigationBar />
        </Content>
      </Card>
      <Row gutter={[34, 15]}>
        <Col span={6}>
          <Createcompent />
          <Addcompents />
        </Col>
        <Cardtemplet />
      </Row>
    </>
  );
}

export default Home;
